package cn.db101.api.complex.api.weather.xinzhi

import com.alibaba.csp.sentinel.annotation.SentinelResource
import com.github.lianjiatech.retrofit.spring.boot.core.RetrofitClient
import org.springframework.stereotype.Repository
import retrofit2.http.GET
import retrofit2.http.Query

/**
 * @author zooy
 * @since 2024/9/14-10:34
 * @desc 心知天气
 * @link https://seniverse.yuque.com/hyper_data/api_v3/nyiu3t
 */
@Repository
@RetrofitClient(baseUrl = "\${weather.xinZhi.url}")
interface XinZhiClient {

    /**
     * 查询天气实况
     */
    @GET("v3/weather/now.json")
    fun queryCurrentWeather(@Query("key") key: String?, @Query("location") location: String?): CurrentResponse

    /**
     * 查询未来天气
     */
    @GET("v3/weather/daily.json")
    fun queryFutureWeather(@Query("key") key: String?,
                           @Query("location") location: String?,
                           @Query("start") start: Int = 0,
                           @Query("days") days: Int = 3
                           ): FutureResponse

}
